Let's play with Pandas!

Simple Analysis of the Cantareira reservoir hydroclimatic data

  1. Import pandas, numpy and matplotlib.pyplot
  2. Create a dataframe from the file "DataCantareira.csv".
  3. Clean your file by droping the NaN
  4. What is the minimum daily accumulated rainfall? Does it seems a resonable observed value? Remove every events (row) with a negative rainfall from the dataframe. hint: use boolean indexing
  5. When the cantareira reservoir experienced its lowest level? Hint:
      • select the volume column
      • Find the lowest value
        • Perform boolean indexing and select the corresponding index
  6. Make a bar plot of the average annual precipitation.
  7. Create a new column with the value of the reservoir volume in m³. Knowing that the maximum capacity of the reservoir is approximatively 1000 billions of liter.
Hint: 
- Conversion: volume (m³) = (volume (%)/100) * 10^9   
- Create a function which return the volume in m^3.
- Use the apply method

  1. In average, which month of the year the reservoir have the highest volume. Similarly, which month of the year there is the highest accumulation of rainfall? (Is there a delay?)

In [ ]: